/**
 * 
 */
package com.py.credit.service;

import java.util.List;
import java.util.Map;

import com.py.credit.entity.TableResult;
import com.py.credit.entity.ViewInfo;
import com.py.credit.entity.common.OptionalColumn;
import com.py.framework.core.common.Page;

/**
 * @author dd
 *
 */

public interface ViewInfoService {

	/**
	 * 创建视图
	 * 
	 * @param viewInfo
	 * @param tableColumnInfo
	 */
	void addView(ViewInfo viewInfo, String tableColumnInfo);

	/**
	 * @param kId
	 * @param condition
	 * @param page
	 * @return
	 */
	List<Map<String, Object>> getTableListForPage(String kId, List<String> showColumns, String[] additioanlColumns,
			String condition, Page page);

	/**
	 * @param viewId
	 * @return
	 */
	List<OptionalColumn> getViewResultOptionalColums(String viewId);

	/**
	 * @param viewId
	 * @return
	 */
	List<OptionalColumn> getViewResultAdvancedConditionColumns(String viewId);

	/**
	 * @param viewId
	 * @param showColumns
	 * @param additioanlColumns
	 * @param condition
	 * @param page
	 * @return
	 */
	List<Map<String, Object>> getViewResultForPage(String viewId, List<String> showColumns, String[] additioanlColumns,
			String condition, Page page);

	/**
	 * 获取默认显示列
	 * 
	 * @param viewId
	 * @return
	 */
	List<String> getDefaultShowColumnEN(String viewId);

	/**
	 * @param viewInfo
	 * @param tableColumnInfo
	 */
	void updateView(ViewInfo viewInfo, String tableColumnInfo);

	/**
	 * @param idArray
	 */
	void del(String[] idArray);

	/**
	 * @param viewId
	 * @return
	 */
	List<TableResult> getDetail(String viewId);

	/**
	 * @param viewId
	 * @return
	 */
	ViewInfo getViewInfoById(String viewId);

}
